package tech.edwardvan.springbootdemo.init;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
 * 系统初始化器3
 * <p>
 * 通过配置文件添加
 * 配置属性: context.initializer.classes
 * <p>
 * 注意:此方式 @Order注解会失效
 *
 * @author EdwardVan
 */
@Slf4j
@Order(Ordered.HIGHEST_PRECEDENCE)
public class DemoApplicationContextInitializer3 implements ApplicationContextInitializer {

    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        log.warn("系统初始化器3,通过配置文件添加");
    }
}
